package com.sikao.app.adapter;

import java.util.ArrayList;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class MyFragmentPagerAdapter extends FragmentPagerAdapter {

	ArrayList<Fragment> list;
	private String tabTitles[];
	public MyFragmentPagerAdapter(FragmentManager fm, ArrayList<Fragment> list, String tabTitles[]) {
		super(fm);
		this.list = list;
		this.tabTitles = tabTitles;
	}

	@Override
	public Fragment getItem(int arg0) {
		return list.get(arg0);
	}

	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public CharSequence getPageTitle(int position) {
		return tabTitles[position];
	}
}
